Automatic protection switching method, device and system

ABSTRACT

Embodiments of the present invention provide an automatic protection switching method, device and system. The method includes: determining a part of services as to-be-switched service(s) according to change of bandwidth when monitoring that the bandwidth of the first transmission path changes; and switching the to-be-switched service(s) between links on the second transmission path and the first transmission path. Another method includes: receiving a partial switching message from a peer network edge node through the first transmission path or the second transmission path; and determining the to-be-switched service(s) according to indication information about the to-be-switched service(s) or bandwidth change information in the partial switching message, and switching the to-be-switched service(s) between links on the first transmission path and the second transmission path.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2010/072860, filed on May 17, 2010, which claims priority toChinese Patent Application No. 200910091787.6, filed on Aug. 25, 2009,both of which are hereby incorporated by reference in their entireties.

FIELD OF THE INVENTION

The embodiments of the present invention relates to communicationstechnologies, and in particular, to an automatic protection switchingmethod, device, and system.

BACKGROUND OF THE INVENTION

A packet transport network (Packet Transport Network, PTN for short) ofa communication system uses a link formed by network element nodes totransmit a data packet of a service. To avoid that failure of a part ofnodes or links affects service transmission, an automatic protectionswitching (Automatic Protection Switching, APS) technology is putforward in an existing PTN. That is, a service on a faulty link isswitched to a preset standby link for transmission, thereby notaffecting service transmission.

Microwave is a type of transmission medium between nodes on a link, andcurrently is widely applied in an operator network. The synchronousdigital hierarchy (Synchronous Digital Hierarchy, SDH for short)technology and the plesiochronous digital hierarchy (PlesiochronousDigital Hierarchy, PDH for short) technology are much more commonlyused, and an E1 service is mainly transmitted. In recent years, an IPservice gradually replaces the E1 services, and occupies most of trafficin the network, and the requirement for bandwidth sharply increases.Under such circumstances, since traditional PDH and SDH microwavescannot well support the IP service, the PDH and SDH microwaves aregradually replaced by a packet microwave technology. A microwave linkhas a relatively special attribute, which is called adaptive modulation(Adaptive Modulation, AM for short). A node that transmits data based onthe microwave may change the modulation mode automatically according tothe change of current environment. This may lead to the bandwidth changeof the microwave link, but may ensure a low bit error rate of servicetransmission.

During the study of the present invention, the inventor finds thatapplying the APS technology in a PTN network that includes a microwavelink has the defects as follows. For the existing APS technology, innormal case, a protected service is transmitted on a working path, andan unprotected service or no service is transmitted on a protectionpath; when a failure occurs, all protected services are switched to theprotection path for transmission. However, in one aspect, due to the AMfeature, a microwave link can still transmit a part of services afterthe bandwidth is adjusted, and service switching may lead to packetloss, which deteriorates service transmission efficiency and servicequality; in another aspect, if the microwave link exists on both theworking path and the protection path, and the bandwidth on theprotection path also decreases, probably the bandwidth requirement ofall switched services cannot be met.

SUMMARY OF THE INVENTION

Embodiments of the present invention provide an automatic protectionswitching method, device, and system, so as to improve efficiency andquality of service transmission that is based on an automatic protectionswitching technology.

An embodiment of the present invention provides an automatic protectionswitching method, including:

determining, by a network edge node according to change of bandwidth, apart of services on a first transmission path or a second transmissionpath as to-be-switched service(s) when monitoring that the bandwidth ofthe first transmission path changes; and

switching, by the network edge node, the to-be-switched service(s)between links on the second transmission path and the first transmissionpath.

An embodiment of the present invention further provides anotherautomatic protection switching method, including:

receiving, by a network edge node, a partial switching message from apeer network edge node of the network edge node through a firsttransmission path or a second transmission path; and

determining, by the network edge node according to indicationinformation about to-be-switched service(s) or bandwidth changeinformation in the partial switching message, a part of services on thefirst transmission path or the second transmission path asto-be-switched service(s), and switching the to-be-switched service(s)between links on the second transmission path and the first transmissionpath.

An embodiment of the present invention provides an automatic protectionswitching device, including:

a determining module, configured to determine a part of services on afirst transmission path or a second transmission path as to-be-switchedservice(s) according to change of bandwidth when a network edge nodemonitors that bandwidth of the first transmission path changes; and

a switching module, configured to switch the to-be-switched service(s)between links on the second transmission path and the first transmissionpath.

An embodiment of the present invention provides another automaticprotection switching device, including:

a message receiving module, configured to receive a partial switchingmessage from a peer network edge node through a first transmission pathor a second transmission path; and

a service switching module, configured to determine, according toindication information about the to-be-switched service(s) or bandwidthchange information in the partial switching message, a part of serviceson the first transmission path or the second transmission path asto-be-switched service(s), and switch the to-be-switched service(s)between links on the second transmission path and the first transmissionpath.

An embodiment of the present invention provides an automatic protectionswitching system, including a first network edge node and a secondnetwork edge node, and a second transmission path and a firsttransmission path exists between the first network edge node and thesecond network edge node through intermediate nodes.

The first network edge node is configured to: determine a part ofservices on the first transmission path or the second transmission pathas to-be-switched service(s) according to change of bandwidth whenmonitoring that the bandwidth change of the first transmission path;switch the to-be-switched service(s) between links on the secondtransmission path and the first transmission path; and send a partialswitching message to the second network edge node at the peer end of thefirst transmission path or the second transmission path, where thepartial switching message includes at least indication information aboutthe to-be-switched service(s) or bandwidth change information.

The second network edge node is configured to: receive the partialswitching message from the first network edge node through the firsttransmission path or the second transmission path; and determine a partof services on the first transmission path or the second transmissionpath as to-be-switched service(s) according to the indicationinformation about the to-be-switched service(s) or the bandwidth changeinformation in the partial switching message, and switch theto-be-switched service(s) between links on the first transmission pathand the second transmission path.

It can be seen from the forgoing technical solution that, according tothe embodiments of the present invention, a technology that performsprotection switching for a part of services when the bandwidth of thetransmission path changes is used, so as to reasonably utilize thebandwidth resources of the first transmission path and the secondtransmission path, reduce the service switching volume, and reducepacket loss caused by the switching. Moreover, the load is reasonablyshared between the first transmission path and the second transmissionpath, so that efficiency and quality of service transmission areimproved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart of an automatic protection switching methodaccording to Embodiment 1 of the present invention;

FIG. 2 is a flow chart of an automatic protection switching methodaccording to a Embodiment 2 of the present invention;

FIG. 3 is a flow chart of an automatic protection switching methodaccording to a Embodiment 3 of the present invention;

FIG. 4 is a schematic diagram of automatic protection switching networkarchitecture according to an embodiment of the present invention;

FIG. 5 is a schematic diagram of a normal transmission state inautomatic protection switching network architecture according to anembodiment of the present invention;

FIG. 6 is a schematic diagram of a protected transmission state inautomatic protection switching network architecture according to anembodiment of the present invention;

FIG. 7 is a schematic diagram of another protected transmission state inautomatic protection switching network architecture according to anembodiment of the present invention;

FIG. 8 is a flow chart of an automatic protection switching methodaccording to Embodiment 4 of the present invention;

FIG. 9 is a flow chart of an automatic protection switching methodaccording to Embodiment 5 of the present invention;

FIG. 10 is a flow chart of an automatic protection switching methodaccording to Embodiment 6 of the present invention;

FIG. 11 is a flow chart of an automatic protection switching methodaccording to Embodiment 7 of the present invention;

FIG. 12 is a flow chart of another automatic protection switching methodaccording to Embodiment 8 of the present invention;

FIG. 13 is a schematic structure diagram of an automatic protectionswitching device according to Embodiment 9 of the present invention;

FIG. 14 is a schematic structure diagram of an automatic protectionswitching device according to Embodiment 10 of the present invention;

FIG. 15 is a schematic structure diagram of an automatic protectionswitching device according to Embodiment 11 of the present invention;

FIG. 16 is a schematic structure diagram of another automatic protectionswitching device according to Embodiment 12 of the present invention;

FIG. 17 is a schematic structure diagram of another automatic protectionswitching device according to Embodiment 13 of the present invention;

FIG. 18 is a schematic structure diagram of another automatic protectionswitching device according to Embodiment 14 of the present invention;

FIG. 19-1 is a diagram of a scenario of an automatic protectionswitching method according to an embodiment of the present invention;

FIG. 19-2 is a diagram of a mapping relationship between a channelallocation policy index and a path bandwidth combination;

FIG. 20 is a diagram of a scenario of channel allocation in a normalstate according to an embodiment of the present invention;

FIG. 21 is diagram of a scenario of protection switching when pathbandwidth in FIG. 20 decreases;

FIG. 22 is a diagram of a scenario of channel allocation according toanother embodiment of the present invention; and

FIG. 23 is a procedure chart of processing an automatic protectionswitching message according to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

The technical solutions in the embodiments of the present invention areclearly and completely described below with reference with theaccompanying drawings. Evidently, the embodiments to be described aremerely a part rather than all of embodiments of the present invention.All other embodiments obtained by persons of ordinary skill in the artbased on the embodiments of the present invention without creativeefforts should fall within the protection scope of the presentinvention.

Embodiment 1

FIG. 1 is a flow chart of an automatic protection switching methodaccording to Embodiment 1 of the present invention. In a networkapplying an APS technology, generally at least one protection path andone working path are included. In this embodiment and all the followingembodiments, the first transmission path may be a working path, and thesecond transmission path may be a protection path. Accordingly, when thefirst transmission path is a protection path, the second transmissionpath is a working path. Both ends of the second transmission path andthe first transmission path are converged to two network edge nodes.These two network edge nodes are configured with atransmitting/receiving selection apparatus, so as to implementprotection switching, namely, to determine the path for transmitting theprotected service. The method in this embodiment specifically may beperformed by either network edge node, and includes the following steps:

Step 101: The network edge node determines a part of services on thefirst transmission path or the second transmission path asto-be-switched service(s) according to bandwidth change information whenmonitoring that the bandwidth of the first transmission path changes.Bandwidth change information specifically may be a changed bandwidthvalue or a bandwidth change value, or may be identified as a changetrend of the bandwidth, and so on.

Step 102: The network edge node switches the to-be-switched service(s)between links on the second transmission path and the first transmissionpath.

Through the technical solution of the present invention, bandwidthchange of the first transmission path is a protection switching triggercondition for triggering partial switching of the service. Instead ofperforming protection switching for all services on the firsttransmission path or the second transmission path uniformly, it isnecessary to select the to-be-switched service(s) among the services onthe first transmission path or the second transmission path according tothe bandwidth change. Therefore, through the technical solution of thisembodiment, automatic protection switching of partial protected servicesmay be implemented according to specific conditions; the load may bereasonably distributed between links on the first transmission path andthe second transmission path; the transmission resources of the firsttransmission path and the second transmission path are fully used; andquality and efficiency of protected service transmission are improved.

Trigger conditions of protection switching are not limited to monitoredbandwidth change of the link. The protection switching may also betriggered by receiving a bandwidth change notification, or bytransmission condition change or transmission requirement change, wherethe change is indicated by other network elements or nodes. Theto-be-switched service(s) may be determined in different ways. Forexample, if the protection switching trigger condition is bandwidthvalue change, the to-be-switched service(s) may be determined accordingto the current bandwidth value of the first transmission path, or theto-be-switched service(s) may be determined by considering the currentbandwidth value of the first transmission path and the bandwidth valueof the second transmission path at the same time; if the protectionswitching trigger condition is a notification message sent by othernetwork elements, the to-be-switched service(s) may be determinedaccording to an indication carried in the notification message; or, whena protection switching trigger condition occurs, the to-be-switchedservice(s) may be determined according to the type or identifier of theprotection switching trigger condition and a locally pre-stored policy.

On the basis of this embodiment, a partial switching message may furtherbe sent to the peer network edge node of the network edge node on thefirst transmission path or the second transmission path after thenetwork edge node switches the to-be-switched service(s) between thesecond transmission path and the first transmission path. The partialswitching message includes at least indication information about theto-be-switched service(s) or bandwidth change information, and is usedto instruct the peer network edge node to determine the to-be-switchedservice(s) according to the partial switching message and to switch theto-be-switched service(s) between links on the second transmission pathand the first transmission path. The partial switching message ispreferably sent through a protection path, and therefore, may be carriedby an APS message. In the current APS technology, the network edge nodesends an APS message to the protection path, so as to ensure thebidirectionality of the automatic protection switching. In thisembodiment, the partial switching message may be born in an APS message,and the switching indication information may be extended and carried inthe APS message, so as to make the partial switching bidirectional.

The partial switching message is used to inform the network edge node atthe other side to perform the corresponding partial automatic protectionswitching. According to the indication information about theto-be-switched, for example, a service identifier, a list of serviceidentifiers, a service type, or service priority, the service thatmatches the indication information about the to-be-switched service(s)is determined as the to-be-switched service(s) and is switched. When theindication information is a service identifier, the service with acorresponding service identifier is the service that matches theindication information. When the indication information is a servicetype, the service that belongs to a same type is the service thatmatches the indication information. Through the foregoing technicalsolution, bidirectional automatic protection switching of the servicemay be achieved.

The service mentioned here refers to traffic born on the transmissionpath, or may be a client service; in a Multi-Protocol label switching(Multi-Protocol Label Switching, MPLS for short) network, the servicemay be traffic of a pseudowire (Pseudowire, PW for short), or traffic ofa label switching path (Label Switching Path, LSP for short) of aninner-layer nesting; and in an Ethernet, the service may also be trafficof an inner-layer virtual local area network (Virtual Local AreaNetwork, VLAN for short). For ease of description, “service” is used torepresent these traffic types in the present invention.

Embodiment 2

FIG. 2 is a flow chart of an automatic protection switching methodaccording to Embodiment 2 of the present invention. This embodiment maybe based on embodiment 1 above. Specifically, partial automaticprotection switching is triggered according to change of bandwidth. Thefirst transmission path may be a working path, and the secondtransmission path may be a protection path. The method includes thefollowing steps:

Step 201: The network edge node monitors bandwidth of the link on thefirst transmission path.

Step 202: The network edge node determines a part of services on thefirst transmission path or the second transmission path asto-be-switched service(s) according to change of the bandwidth whenmonitoring that the bandwidth of the link on the first transmission pathchanges; meanwhile, the network edge node may also determine theindication information about the to-be-switched service(s) according tobandwidth change of the first transmission path.

Step 203: The network edge node switches the to-be-switched service(s)between links on the second transmission path and the first transmissionpath, and may further send a partial switching message to the peernetwork edge node of the second transmission path, where the partialswitching message includes at least indication information about theto-be-switched service(s) or bandwidth change information.

Through the technical solution of the present invention, the networkedge node may switch the part of services that match the protectionswitching policy according to bandwidth change of the first transmissionpath. When the bandwidth decreases, the service may be switched from thefirst transmission path to the second transmission path; when thebandwidth of the first transmission path increases, the service may beswitched from the second transmission path to the first transmissionpath. When switching the service, the network edge node further sendsindication information capable of identifying the to-be-switchedservice(s) to the first transmission path or the second transmissionpath. The indication information is sent to the peer network edge nodeof the network edge node, so that the peer network edge node istriggered to switch the service according to the indication information.In this way, bidirectional service protection switching is achieved.

Through the technical solution of the embodiments of the presentinvention, merely a part of protected services is switched according tothe bandwidth when the link bandwidth changes, which avoids that allprotected services are switched. The first transmission path may alsotransmit a part of protected services, so that the switching trafficvolume and the packet loss caused by the switching are reduced. Inanother aspect, the original transmission efficiency of the secondtransmission path is not affected by too many protected servicestransmitted on the second transmission path.

The operation of determining the to-be-switched service(s) and theindication information about the to-be-switched service(s) in step 202above may be: determining by querying the pre-stored protectionswitching policy according to bandwidth change.

In this embodiment, the protection switching policy may be pre-stored ineach network edge node, and the protection switching policy includes amapping relationship between the changed bandwidth value or the changevalue of the bandwidth, the to-be-switched service, and the indicationinformation about the to-be-switched service. For example, theprotection switching policy includes a mapping relationship between thestored bandwidth value and the priority value, and the services aredistinguished according to the priority value. A switching rule mayfurther be stored in the protection switching policy. For example, aservice with priority greater than or higher than a priority value isswitched to the first transmission path, and a service with prioritylower than the priority value is switched to the second transmissionpath.

Specific content of the protection switching policy is not limitedthereto. For example, the indication information about theto-be-switched service(s) may be a switching proportion, and theswitching rule is to switch a certain proportion of protected servicesto the second transmission path or the first transmission path when thebandwidth value reaches a certain value. The content of the protectionswitching policy may be set according to specific requirements. Theprotection switching policy may be preset and then stored in eachnetwork edge node, or the protection switching policy is provided forthe network edge node on one side through a trigger condition that is inthe form of a notification, and then the protection switching policy iscarried a partial switching message and sent to the peer network edgenode.

In practical applications, the automatic protection switching of partialservices is not necessarily triggered by monitoring the bandwidth of thelink on the first transmission path, but may also be triggered bymonitoring the bandwidth of the link on the second transmission path.When it is monitored that the bandwidth of the link on the firsttransmission path changes, the protection switching policy may bequeried to determine the to-be-switched service(s) and the indicationinformation about the to-be-switched service(s) according to bandwidthchange.

Alternatively, the bandwidth of the link on the first transmission pathand the bandwidth of the link on the second transmission path may alsobe monitored simultaneously to determine the to-be-switched service(s).

This technical solution is especially applicable to the case that amicrowave link is involved. The network edge node monitors the bandwidthof the link on the first transmission path, that is, monitors bandwidthchange of the microwave link on the first transmission path caused byadaptive modulation due to environment change. Specifically, when suchphenomenon as environment change occurs, the network edge node thatinteracts with the neighboring node in a form of a microwave will changethe modulation mode due to the AM feature, thereby changing thebandwidth. Therefore, the network edge node may acquire the change ofthe local bandwidth. At this time, if the bandwidth decreases, it doesnot mean that the link fails, and a part of services may still betransmitted. Therefore, the network edge node may switch a part ofprotected services to the second transmission path according to thetechnical solution of this embodiment, so that the network load isshared by the second transmission path and the first transmission path,and the bandwidth resources of the network are fully used.

Embodiment 3

FIG. 3 is a flow chart of an automatic protection switching methodaccording to Embodiment 3 of the present invention. The APS method inthis embodiment may be implemented based on the link arrangement shownin FIG. 4. The APS may include several modes: 1:1, 1:n, and m:n mode.1:1 refers to one protection path and one working path, where theworking path is known as a first transmission path, and the protectionpath is known as a second transmission path. 1:n refers to one secondtransmission path and n first transmission paths. m:n refers to m secondtransmission paths and n first transmission paths, where m and n arenatural numbers. The 1:1 mode is taken as an example for illustration.FIG. 4 is a schematic diagram of an automatic protection switchingnetwork architecture according to an embodiment of the presentinvention. As shown in FIG. 4, the links between multiple intermediatenodes form two paths; one is set as the first transmission path 410; andthe other is set as the second transmission path 420. The nodesconverged at both ends of the first transmission path 410 and the secondtransmission path 420 are network edge nodes. All nodes are packetswitching nodes. A transmission medium, or also known as a transmissionmode, between nodes may vary. For example, the transmission mediumbetween the first network edge node 401 and the first intermediate node402 and the fourth intermediate node 406 or between the firstintermediate node 402 and the second intermediate node 403 is amicrowave link. Other media are used as transmission links between thesecond network edge node 405, the third intermediate node 404, the fifthintermediate node 407, and the sixth intermediate node 408. It isassumed that, packets of three protected services, that is, firstservice 430, second service 440, and third service 450, are transmittedbetween the first network edge node 401 and the second network edge node405, as shown in FIG. 5. Specifically, the MPLS network is taken as anexample. The first transmission path 410 and the second transmissionpath 420 are LSPs. The service mentioned here may be a pseudowire, or aclient signal before pseudowire encapsulation. If the service is in apseudowire mode, the corresponding pseudowire priority needs to beconfigured as service priority for each pseudowire at the network edgenode; if the service is in a client signal mode, the correspondingservice priority needs to be configured for each service at the networkedge node. For the MPLS network, the pseudowire mode is recommended, andthe switching is performed according to the pseudowire.

This embodiment may be based on the second embodiment, and specificallyis performed by the first network edge node 401 shown in FIG. 4. Thisembodiment includes the following steps:

Step 301: The first network edge node 401 monitors the bandwidth of thelink on the first transmission path 410. Specifically, the first networkedge node 401 monitors whether the bandwidth of the microwave link tothe first intermediate node 402 changes due to modulation mode change.If the bandwidth of the microwave link between other nodes on the firsttransmission path 410 changes due to change of the modulation mode,other nodes may send a notification message to the first network edgenode 401 to notify change of the bandwidth.

Step 302: When monitoring that the bandwidth of the link on the firsttransmission path 410 decreases, for example, a bandwidth valuedecreases from an original bandwidth value 1 Gbps to 0.6 Gbps, the firstnetwork edge node 401 queries a stored priority value corresponding tothe value in the protection switching policy according to the currentbandwidth value after a decrease, determines the service with prioritylower than the priority value as the service to be switched from thefirst transmission path 410 to the second transmission path 420according to the switching rule in the protection switching policy, anddetermines the priority value as indication information about theto-be-switched service, where the switching rule is pre-stored in theprotection switching policy. The switching rule includes at least anindication information that instructs the network edge node to determinethe service with priority lower than the priority value as the serviceto be switched from the first transmission path to the secondtransmission path, and to determine the priority value as indicationinformation about the to-be-switched service.

Specifically, the protection switching policy may be pre-stored in thenetwork edge node, and the priority value may be set according to adecrement of bandwidth or a decrement range of bandwidth, or a decreasedbandwidth value or a value range of bandwidth decrease. For example,when the bandwidth decreases to 0.6 Gbps, the corresponding queriedpriority value is set to 4. Service priority is set for each servicerespectively, and may be carried in a packet of the service; or, thenetwork edge node queries the protection switching policy to obtain thepriority value corresponding to the bandwidth value according tobandwidth change, and then queries and identifies the service prioritycorresponding to each service locally, so that the service priority canbe compared with the queried priority value. For example, the servicepriority of the first service 430 is set to 7; the service priority ofthe second service 440 is set to 3; and the service priority of thethird service 450 is set to 5. Therefore, it is determined that theservice priority of the second service 440 is lower than 4, the secondservice 440 is a to-be-switched service, and the priority value 4 isindication information about the to-be-switched service.

Step 303: The first network edge node 401 switches the to-be-switchedservice, namely, the second service 440, from the first transmissionpath 410 to the second transmission path 420, and sends a partialswitching message to the second network edge node 405 at the peer end ofthe second transmission path 420. The partial switching message carriesat least indication information about the to-be-switched service,namely, priority value 4. A network transmission state after switchingis as shown in FIG. 6. When the first network edge node 401 does notneed to send the protected service from the second transmission path420, the first network edge node generally sends a No Request (NoRequest, NR for short) message to the second transmission path 420; whenprotection switching is required, the partial switching message above isgenerated.

Step 304: After receiving the partial switching message transmitted fromthe second transmission path 420, the second network edge node 405parses the partial switching message to obtain the indicationinformation about the to-be-switched service, and switches the servicewith priority lower than priority value 4 according to the protectionswitching policy, that is, the second service 440 is switched from thefirst transmission path 410 to the second transmission path 420, so thatbidirectional protection switching is complete. The protection switchingpolicy may also include a switching rule. The switching rule includes atleast an indication that instructs the second network edge node 405 toswitch the services with priority lower than the specified priorityvalue from the first transmission path 410 to the second transmissionpath 420.

The second network edge node 405 may pre-store the protection switchingpolicy that is the same as the protection switching policy in the firstnetwork edge node 401, or receives the protection switching policy thatis sent together with the partial switching message by the first networkedge node 401.

Through the technical solution of this embodiment, when the bandwidth ofthe first transmission path decreases due to the AM of the microwavelink, no signal degradation (Signal Degrade, SD for short) occurs, andmerely the service with lower priority may be switched to the secondtransmission path, so that the decrease of the bandwidth of the firsttransmission path does not affect transmission of services with higherpriority. The problem that transmission quality of the firsttransmission path is deteriorated due to the decrease of the bandwidthmay be avoided by switching of a part of services. Moreover, theresidual bandwidth of the first transmission path can further be fullyused, thus avoiding affecting the transmission efficiency and quality ofthe original unprotected services on the second transmission path by toomany protected services switched to the second transmission path.Meanwhile, the decrease of service switching volume can reduce packetloss caused by the switching. The protected services are reasonablydistributed to the first transmission path and the second transmissionpath, and therefore, the load may be shared, and maximum protection isprovided for the services.

In this embodiment, partial automatic protection switching of theservice may be performed for more than once. After the partial automaticprotection switching of the service is performed, if any network edgenode monitors that the bandwidth decreases, for example, the bandwidthdecreases from 0.6 Gbps to 0.3 Gbps, the corresponding priority valuemay be queried and determined, for example, the priority value is 6 whenthe bandwidth is 0.3 Gbps, and the third service 350 with the servicepriority being 5 is also switched to the second transmission path 420,as shown in FIG. 7.

Embodiment 4

FIG. 8 is a flow chart of an automatic protection switching methodaccording to Embodiment 4 of the present invention. This embodimentdiffers from Embodiment 3 in that: Embodiment 3 shows the case that theservice is switched from the first transmission path to the secondtransmission path when the bandwidth of the link on the firsttransmission path decreases; and this embodiment shows the case that theservice is switched from the second transmission path to the firsttransmission path when the bandwidth of the link on the firsttransmission path increases. The detailed steps are as follows:

Step 801: The first network edge node 401 monitors the bandwidth of thelink on the first transmission path 410.

Step 802: When monitoring that the bandwidth of the link on the firsttransmission path 410 increases, the first network edge node 401 queriesthe protection switching policy to obtain the priority valuecorresponding to the increased bandwidth value or the bandwidth increasevalue according to the increase of the bandwidth. The protectionswitching policy includes at least a mapping relationship between theincreased bandwidth value or bandwidth increase value and the priorityvalue, and includes a switching rule. The switching rule includes atleast indication information of determining the services with priorityequal to or higher than the priority value as the services to beswitched from the second transmission path 420 to the first transmissionpath 410, and determining the priority value as indication informationabout the to-be switched service. According to the switching rule storedin the protection switching policy, the first network edge node 401determines the service with priority equal to or higher than thepriority value as a service to be switched from the second transmissionpath 420 to the first transmission path 410, and determines the priorityvalue as indication information about the to-be-switched service. Forexample, when the bandwidth increases from 0.3 Gbps to 0.6 Gbps, thepriority value is determined as 4, and the second service 440 with theservice priority being 5 is determined as the to-be-switched service,and the priority value 4 is determined as the indication informationabout the to-be-switched service.

It should be noted that, for ease of description in this embodiment,merely a second service 440 is switched. In a practical network, morethan one service may be switched. That is, all services with prioritylower than a priority value are switched at the first network edge node401, where the priority value is in the protection switching policy andcorresponds to the changed bandwidth value.

Step 803: The first network edge node 401 switches the to-be-switchedservice(s) from links on the second transmission path 420 to the firsttransmission path 410, and sends a partial switching message to thesecond network edge node 405 at the peer end of the second transmissionpath 420. The partial switching message includes at least indicationinformation about the to-be-switched service.

Step 804: The second network edge node 405 receives from the secondtransmission path 420 the partial switching message sent by the firstnetwork edge node 401, parses the partial switching message to obtainthe priority value 4, and according to the protection switching policy,switches the second service 440 with service priority lower than thepriority value from links on the first transmission path 410 to thesecond transmission path 420 for transmission. The protection switchingpolicy may further include a switching rule. The switching rule includesat least an indication that instructs the second network edge node 405to switch the services with priority lower than the specified priorityvalue from the first transmission path 410 to the second transmissionpath 420.

It should be noted that, for ease of description in this embodiment,merely a second service 440 is switched. In a practical network, morethan one service may be switched. That is, all services with prioritylower than a priority value are switched at the second network edge node405, where the priority value is obtained from the parsed partialswitching message.

Through the technical solution of this embodiment, when the network edgenode monitors that the bandwidth of the first transmission path changesdue to AM of the microwave link, that a service is transmitted on whichpath may be controlled according to service priority. Therefore, thebandwidth resources are utilized reasonably; the packet loss caused byswitching of all protected services is reduced; and efficiency andquality of network transmission can be improved.

Embodiment 5

FIG. 9 is a flow chart of an automatic protection switching methodaccording to Embodiment 5 of the present invention. This embodimentdiffers from Embodiment 3 and Embodiment 4 in that: Embodiment 3 andEmbodiment 4 show a situation where merely the link bandwidth of thefirst transmission path is considered when the priority value of theswitching is determined; in this embodiment, the priority value of theto-be-switched service(s) is determined with reference with thebandwidth of the first transmission path and the bandwidth of the secondtransmission path. In this embodiment, the network architecture shown inFIG. 4 is taken as an example for illustration.

Step 901: The first network edge node 401 monitors the bandwidth of thefirst transmission path 410 and the second transmission path 420.Specifically, the bandwidth of the microwave link between the firstnetwork edge node 401, the first intermediate node 402, and the fourthintermediate node 406 is monitored.

Step 902: When monitoring that the bandwidth of the first transmissionpath 410 and/or the second transmission path 420 changes or changesimultaneously, the first network edge node 401 queries the protectionswitching policy to obtain the priority value corresponding to thebandwidth value according to the current change of the bandwidth of thefirst transmission path 410 and the second transmission path 420. Theprotection switching policy includes at least a mapping relationshipbetween the changed bandwidth value or the bandwidth change value andthe priority value, and includes the switching rule. The switching ruleincludes at least an indication that instructs the first network edgenode 401 to perform protection switching for a part of servicesaccording to the priority value. That is, the service with priorityequal to or higher than the priority value is determined as the serviceto be switched from the second transmission path 420 to the firsttransmission path 410; the service with priority lower than the priorityvalue is determined as the service to be switched from the firsttransmission path 410 to the second transmission path 420; and thepriority value is determined as indication information about theto-be-switched service(s). The first network edge node 401 performsprotection switching for a part of services according to the switchingrule in the protection switching policy and the priority value. That is,the service with priority equal to or higher than the priority value isdetermined as the service to be switched from the second transmissionpath 420 to the first transmission path 410; the service with prioritylower than the priority value is determined as the service to beswitched from the first transmission path 410 to the second transmissionpath 420; and the priority value is determined as indication informationabout the to-be-switched service(s).

Specifically, the protection switching policy may be pre-stored in thenetwork edge node, and the priority value may be set according to thecorresponding values of the bandwidth of first transmission path and thebandwidth of the second transmission path. For example, when thebandwidth of the first transmission path is 0.6 Gbps, and the bandwidthof the second transmission path is also 0.6 Gbps, the priority value isdetermined as 4 by querying the protection switching policy.Alternatively, the priority value may further be determined according tothe increase value or decrease value of the bandwidth of the firsttransmission path. When the priority value is determined as 4, for thesituation shown in FIG. 5, the second service 440 with the servicepriority 4 may be determined as a to-be-switched service, and thepriority value 4 is determined as indication information about theto-be-switched service. Specifically, the to-be-switched service(s) maybe identified in the first transmission path 410 and the secondtransmission path 420 respectively. When a service with priority lowerthan the priority value is identified in the first transmission path410, the service is determined as a to-be-switched service, and isswitched to the second transmission path 420; when a service withpriority equal to or higher than the priority value is identified in thesecond transmission path 420, the service is determined as ato-be-switched service, and is switched to the first transmission path410. Here, the number of the to-be-switched service(s) is one or morethan one.

Step 903: The first network edge node 401 switches the to-be-switchedservice(s) between the link on the second transmission path 420 and thelink on the first transmission path 410 according to the indicationinformation about the to-be-switched service, and sends a partialswitching message to the second network edge node 405 at the peer end ofthe second transmission path 420, where the partial switching messageincludes at least the indication information about the to-be-switchedservice.

Step 904: The second network edge node 405 receives the partialswitching message sent by the first network edge node 401 from thesecond transmission path 420, parses the partial switching message toobtain the priority value 4, uses the switching rule in the protectionswitching policy, and performs protection switching for a part ofservices according to the priority value. That is, a service withpriority lower than the priority value in the link of the firsttransmission path 410 is determined as a to-be-switched service and isswitched to a link on the second transmission path 420 for transmission,and a service with priority equal to or higher than the priority valuein the link of the second transmission path 420 is determined as ato-be-switched service and is switched to a link on the firsttransmission path 410 for transmission. The switching rule may be thesame as or different from the switching rule in the first network edgenode 401. For example, the protection switching may be performed for apart of services according to the priority value, that is, a servicewith priority lower than the priority value in the link of the firsttransmission path 410 is determined as a to-be-switched service and isswitched to the link on the second transmission path 420, and a servicewith priority equal to or higher than the priority value in the link ofthe second transmission path 420 is determined as a to-be-switchedservice and is switched to the link on the first transmission path 410.

The second network edge node 405 may perform a step similar to step 902above, identify the services in the first transmission path 410 and thesecond transmission path 420 according to the priority value first,determine the services that match the condition as to-be-switchedservice(s) according to the identification result, and switch theservices between the first transmission path 410 and the secondtransmission path 420. Therefore, it is ensured that the service withlower priority is transmitted in the second transmission path 420, andthe service with higher priority is transmitted in the firsttransmission path 410.

Through the technical solution of this embodiment, when the network edgenode monitors that the bandwidth of the first transmission path changesdue to AM of the microwave link, that a service is transmitted on whichpath may be controlled according to the service priority. Therefore, thebandwidth resources are utilized reasonably, the packet loss caused byswitching of all protected services is reduced, and efficiency andquality of network transmission can be improved.

In practical applications, the switching protection policy is notlimited to distinguishing the to-be-switched service(s) according towhether the service priority is greater or lower than a priority value,and the to-be-switched service(s) may also be identified directlyaccording to a service identifier, or a list of service identifiers, ora service group identifier, or a packet priority value. For example, theservices with a certain priority value or certain priority values aredetermined directly as services that should be switched to the secondtransmission path, and, if that these services are transmitted on thefirst transmission path is monitored, protection switching is performed.Specifically, in an MPLS network, multiple pseudowires may form apseudowire group, and a group identifier is allocated to the pseudowiregroup. A label switching path may bear multiple pseudowire groups. Whenswitching is performed, identifiers of one or more pseudowire groupsthat need to be switched are carried in an MPLS APS message, notifyingthe peer that the services in the/these pseudowire groups need to beswitched to the second transmission path.

Embodiment 6

FIG. 10 is a flow chart of an automatic protection switching methodaccording to Embodiment 6 of the present invention. In the forgoingembodiment, a path-layer APS message may be used to bear a partialswitching message, thereby triggering partial protection switching. Inthis embodiment, a channel-layer APS message is used to triggerprotection switching. Generally, a setting is specific to one or moreservices transmitted on a channel. Therefore, when a channel-layer APSmessage is used to trigger protection switching, the APS message doesnot need to carry the identifier or priority of the to-be-switchedservice, but an APS message is sent for to-be-switched service(s)transmitted on each channel. In this embodiment, a Multiple-Protocollabel switching/pseudo wires (Multi-Protocol Label Switching/PseudoWires, MPLS/PW for short) network is taken as an example. The methodincludes the following steps:

Step 1001: The network edge node monitors the bandwidth of the firsttransmission path and/or the second transmission path. Specifically, itmay be that the bandwidth of the microwave link of the network edge nodeis monitored directly.

Step 1002: When monitoring that the bandwidths of the first transmissionpath and/or the second transmission path changes or changesimultaneously, the network edge node queries the protection switchingpolicy to determine the corresponding to-be-switched service(s)according to bandwidth change. The protection switching policy includesat least a mapping relationship between the changed bandwidth value orthe bandwidth change value and the to-be-switched service.

Step 1003: The network edge node switches the to-be-switched service(s)from the working pseudowire on the first transmission path to theprotection pseudowire on the second transmission path for transmission,and may send a PW APS message, namely, a partial switching message, onthe corresponding protection pseudowire, where the partial switchingmessage carries identification information as an indication of switchingthe service on the channel to the protection pseudowire fortransmission. The identifier of the channel for transmitting the PW APSmessage is the indication information about the to-be-switched service.

Step 1004: The peer network edge node of the network edge node receivesthe partial switching message through the first transmission path or thesecond transmission path.

Step 1005: The peer network edge node of the network edge node uses theidentifier of the channel for transmitting the partial switching messageas indication information about the to-be-switched service, anddetermines the services on the channel as to-be-switched service(s)according to the identifier of the channel.

Step 1006: The peer network edge node switches the to-be-switchedservice(s) between links on the first transmission path and the secondtransmission path.

In this embodiment, when receiving the corresponding PW APS message, thepeer network edge node uses the identifier of the channel fortransmitting the PW ASP message as indication information about theto-be-switched service(s), and determines the services over the workingpseudowire of the channel as services that need to be switched to theprotection pseudowire of the second transmission path. In thisembodiment, the first transmission path may be a working path, and thesecond transmission path may be a protection path.

In this embodiment, the channel may refer to PW; for an MPLS labelstack, the channel may also be an inner-layer LSP; for an Ethernetnetwork, the channel may be a VLAN and a service instance identifier(Service Instance Identifier, I-SID for short).

Embodiment 7

FIG. 11 is a flow chart of an automatic protection switching methodaccording to Embodiment 7 of the present invention. The partialswitching message transmitted in the forgoing embodiments carriesindication information about the to-be-switched service. In thisembodiment, the partial switching message carries a protection switchingtrigger condition that is capable of triggering partial protectionswitching. Specific steps includes the following:

Step 1101: The network edge node monitors the bandwidth of the link onthe first transmission path and/or the second transmission path.

Step 1102: When monitoring that the bandwidth of the first transmissionpath and/or the second transmission path changes, the network edge nodequeries the protection switching policy to determine the correspondingto-be-switched service(s) according to bandwidth change. The protectionswitching policy includes at least a mapping relationship between thechanged bandwidth value or the bandwidth change value and theto-be-switched service.

Step 1103: The network edge node switches the to-be-switched service(s)between links on the second transmission path and the first transmissionpath, and specifically, switches the path used for sending the servicesfrom the network edge node to the peer network edge node.

Step 1104: The network edge node sends a partial switching message tothe network edge node at the peer end of the first transmission path orthe second transmission path. The partial switching message includes atleast bandwidth change information that is capable of triggering thepartial switching, namely, a changed bandwidth value or a bandwidthchange value of the first protection path and/or the second protectionpath. The bandwidth change information is used to instruct the peernetwork edge node to determine the to-be-switched service(s) accordingto the bandwidth change of the first protection path and/or the secondprotection path, and switch the to-be-switched service(s) between linkson the second transmission path and the first transmission path.

Step 1105: The peer network edge node receives the partial switchingmessage through the first transmission path or the second transmissionpath.

Step 1106: According to the bandwidth change information in the partialswitching message, the peer network edge node queries the localprotection switching policy to determine the corresponding service asthe to-be-switched service. The bandwidth change information includes atleast a bandwidth change value and/or a changed bandwidth value, and theprotection switching policy includes at least a mapping relationshipbetween the bandwidth change value and/or the changed bandwidth valueand the to-be-switched service.

Step 1107: The peer network edge node switches the to-be-switchedservice(s) between links on the first transmission path and the secondtransmission path.

In this embodiment, the first transmission path may be a working path,and the second transmission path may be a protection path.

In this embodiment, the network edge node uses a partial switchingmessage to trigger the peer network edge node to perform partialswitching; and the peer network edge node self-determines theto-be-switched service(s) according to the local protection switchingpolicy and the bandwidth change information of the first transmissionpath and/or the second transmission path. Specifically, the path used bythe service sent by the peer network edge node itself is determined. Theprotection switching policies in the two network edge nodes may be thesame or different, and the determined to-be-switched service(s) may bethe same or different.

In this embodiment, adjusting distribution of the services on the firsttransmission path and the second transmission path refers todistributing different services onto the first transmission path or thesecond transmission path for transmission through a preset distributionalgorithm. In an MPLS network, it may be that multiple pseudowires aredistributed to the working LSP and the protection LSP; in an Ethernetnetwork, it may be that multiple client VLANs are distributed todifferent operator VLAN tunnels or provider backbone bridge-trafficengineering (Provider Backbone Bridge-Traffic Engineering, PBB-TE forshort) tunnels. Performing service adjustment may ensure normaltransmission of the service to the utmost.

On the basis of the forgoing embodiments, when monitoring that thebandwidth of the first transmission path and/or the second transmissionpath changes, the network edge node may further determine a part ofservices on the first transmission path and/or the second transmissionpath as to-be-discarded services according to the change of bandwidth ofthe first transmission path and/or the second transmission path, anddiscard the to-be-discarded services. The discarding occurs mainly inthe case that the bandwidth value decreases. Preferably, when thebandwidth required for transmitting the service exceeds the sum of thebandwidth of the first transmission path and the bandwidth of the secondtransmission path, a part of low-priority services may be determined asto-be-discarded services. The network edge node may further send an APSmessage to notify the peer network edge node of performing switching.The APS message carries information about the current bandwidth of thefirst transmission path and/or the second transmission path, so that thepeer network edge node self-determines the to-be-discarded servicesaccording to bandwidth change. Definitely, the network edge node mayalso add identification information of these to-be-discarded services(information such as PW tag, VLAN tag, and service priority) into theAPS message or other messages, and send the message to notify the peernetwork edge node, so as to ensure that the services discarded on bothsides are consistent.

Embodiment 8

FIG. 12 is a flow chart of another automatic protection switching methodaccording to Embodiment 8 of the present invention. This embodiment maybe performed by a network edge node. In this embodiment, the firsttransmission path may be a working path, and the second transmissionpath may be a protection path. The method includes the following steps:

Step 1201: The network edge node receives a partial switching messagefrom a peer network edge node of the network edge node through a firsttransmission path or a second transmission path. Specifically, thepartial message may be received from the first transmission path, or maybe received from the second transmission path. Preferably, the partialswitching message is born in an APS message transmitted in the secondtransmission path.

Step 1202: The network edge node determines a part of services on thefirst transmission path or the second transmission path asto-be-switched service(s) according to indication information about theto-be-switched service(s) or bandwidth change information in the partialswitching message, and switches the to-be-switched service(s) betweenlinks on the second transmission path and the first transmission path.

Through the technical solution of this embodiment, protection switchingfor a part of services may be implemented, which avoids that allservices are switched. Therefore, a part of services may further betransmitted on the first transmission path, so that the switchingtraffic volume and the packet loss caused by the switching are reduced.In another aspect, the original transmission efficiency of the secondtransmission path is not affected by too many protected servicestransmitted on the second transmission path. The network edge nodecompletes the corresponding switching operation when receiving a partialswitching message, and may implement bidirectional switching ofservices.

The network edge node may serve as a sender or a receiver of the partialswitching message when coordinating with a part of switching triggernodes to complete the bidirectional switching of the service.

The indication information about the to-be-switched service(s) may be inmultiple forms, for example, a service identifier, a service type, orproportion of services that need to be switched. The services may beselected randomly for switching according to the proportion.

Specifically, this embodiment may be implemented based on the networkarchitecture shown in FIG. 4, and specifically may be performed by thesecond network edge node 405.

The second network edge node 405 receives a partial switching messagesent by the first network edge node 401 from the second transmissionpath 420.

The second network edge node 405 parses the partial switching message toobtain the priority value as indication information about theto-be-switched service. For example, the indication information is thepriority value 4.

The second network edge node 405 determines a service with prioritylower than the priority value in the link of the first transmission path410 as a to-be-switched service(s) according to the protection switchingpolicy and the switching rule in the protection switching policy andswitches the service to the link on the second transmission path 420 fortransmission, and/or determines a service with priority equal to orhigher than the priority value in the link of the second transmissionpath 420 as a to-be-switched service(s) and switches the service to thelink on the first transmission path 410 for transmission. That is, as areceiver of the partial switching message, the second network edge node405 may judge whether any service on the first transmission path 410 andthe second transmission path 420 needs to be switched respectivelyaccording to the indication information. The protection switching policyincludes at least the service priority of the to-be-switched service,and the switching rule includes at least an indication of determining aservice with priority lower than the priority value in the link of thefirst transmission path 410 as a to-be-switched service(s) and switchingthe service to the link on the second transmission path 420 fortransmission, and/or determining a service with priority equal to orhigher than the priority value in the link of the second transmissionpath 420 as a to-be-switched service(s) and switching the service to thelink on the first transmission path 410 for transmission.

In the forgoing embodiments of the present invention, the protectionswitching policy is not limited to determining the to-be-switchedservice(s) according to the priority value, and the current modulationlevel and bandwidth level information may further be used as a switchingidentifier for determining the to-be-switched service. Any indicationinformation is appropriate so long as the service can be distinguishedaccording to the bandwidth. The technical solution of the embodiments ofthe present invention is not limited to being applied in the PTN networkshown in FIG. 4, but may be applied in other packet networks based onthe APS technology, and is not limited to the 1:1 switching mode, butmay use the 1:n or m:n switching mode. Any switching mode is appropriateso long as a part of services are switched between the firsttransmission path and the second transmission path according to changeof the bandwidth.

In all embodiments described above, specifically, the service isswitched when the service priority is lower than the priority value. Inpractical applications, however, the switching rule in the protectionswitching policy is not limited thereto. The service with priorityhigher than or equal to a set priority value may also be switched.

In practical applications, not only the first transmission path may usemicrowave links vulnerable to adaptive modulation, but also the secondtransmission path may employ microwave links vulnerable to adaptivemodulation. Therefore, the switching trigger condition is notnecessarily generated according to the state of the first transmissionpath, but may be obtained according to the state of the secondtransmission path, or the indication information such as priority valuein the protection switching policy may be determined according to thestate such as bandwidth of the first transmission path and the secondtransmission path.

In another automatic protection switching method provided in anembodiment of the present invention, step 1202 may include the followingsteps:

The network edge node uses an identifier of a channel for transmitting apartial switching message as indication information about theto-be-switched service, and determines the services over the channel asto-be-switched service(s) according to the identifier of the channel.

The network edge node switches the to-be-switched service(s) betweenlinks on the second transmission path and the first transmission path.

For detailed operations, reference may be made to the description inEmbodiment 6.

In another automatic protection switching method provided in anembodiment of the present invention, step 1202 may include the followingsteps:

According to the bandwidth change information in the partial switchingmessage, the network edge node queries the local protection switchingpolicy to determine the corresponding service as the to-be-switchedservice. The protection switching trigger condition is preferably abandwidth value of the first protection path and/or the secondprotection path, where the bandwidth value is monitored by the peernetwork edge node. The bandwidth change information includes at least abandwidth change value and/or a changed bandwidth value, and theprotection switching policy includes at least a mapping relationshipbetween the bandwidth change value and/or the changed bandwidth valueand the to-be-switched service.

The network edge node switches the to-be-switched service(s) betweenlinks on the second transmission path and the first transmission path.

For detailed operations, reference may be made to the description inEmbodiment 7.

On the basis of the forgoing embodiments, after receiving the partialswitching message from the peer network edge node through the firsttransmission path or the second transmission path, the network edge nodemay further determine a part of services on the first transmission pathand/or the second transmission path as to-be-discarded servicesaccording to the bandwidth change information included in the partialswitching message, and discard the to-be-discarded services. Preferably,the to-be-discarded service may be determined according to the bandwidthvalue monitored by the peer network edge node. The to-be-discardedservices determined by both network edge nodes may be low-priorityservices, and may be the same or different.

Embodiment 9

FIG. 13 is a schematic structure diagram of an automatic protectionswitching device according to Embodiment 9 of the present invention,including a determining module 10 and a switching module 20. Thedetermining module 10 is configured to determine a part of services on afirst transmission path or a second transmission path as to-be-switchedservice(s) according to change of bandwidth when monitoring that thebandwidth of the first transmission path changes; and the switchingmodule 20 is configured to switch the to-be-switched service(s) betweenlinks on the second transmission path and the first transmission path.

The automatic protection switching device in this embodiment may be astand-alone network element device or integrated in a network edge nodeof a packet network, may perform the automatic protection switchingmethod provided in the embodiments of the present invention, and maydetermine a part of services from the protected services for switchingbetween the second transmission path and the first transmission path,which implements that the load is distributed reasonably, and qualityand efficiency of transmitting packets are improved.

Further, the automatic protection switching device may further include:a message sending module 30. The message sending module 30 may beconnected to the determining module 10, and is configured to send apartial switching message to a network edge node at the peer end of thefirst transmission path or the second transmission path. The partialswitching message includes at least indication information about theto-be-switched service(s) or bandwidth change information. Suchinformation is used to instruct the peer network edge node to determinethe to-be-switched service(s) according to the partial switching messageand switch the to-be-switched service(s) between links on the secondtransmission path and the first transmission path. The network edge nodeat the peer end of the first transmission path or the secondtransmission path may be notified of performing the correspondingprotection switching by sending a partial switching message, so as toimplement bidirectional automatic protection switching of the service.

Embodiment 10

FIG. 14 is a schematic structure diagram of an automatic protectionswitching device according to Embodiment 10 of the present invention.This embodiment may be based on Embodiment 9. The determining module 10includes a bandwidth monitoring unit 11 and a switching determining unit12. The bandwidth monitoring unit 11 is configured to monitor bandwidthof the first transmission path; and the switching determining unit 12 isconfigured to determine a part of services on the first transmissionpath or the second transmission path as to-be-switched service(s)according to change of the bandwidth when monitoring that the bandwidthof the first transmission path changes, and determine indicationinformation about the to-be-switched service(s) according to bandwidthchange of the first transmission path.

This embodiment may perform the automatic protection switching methodprovided in an embodiment of the present invention, and determine theprotected services that need to be switched according to the change ofbandwidth. This embodiment is especially applicable to monitoringbandwidth change caused by adaptive modulation of the microwave link dueto environment factors. At this time, although the bandwidth decreases,a part of bandwidth resources are still available.

On the basis of the foregoing technical solution, the switchingdetermining unit 12 includes: a first priority querying subunit 121 anda first service determining subunit 122. The first priority queryingsubunit 121 is configured to query the protection switching policy toobtain the priority value corresponding to the decreased bandwidth valueor the bandwidth decrease value according to the bandwidth decrease whenmonitoring that the bandwidth of the link on the first transmission pathdecreases. The protection switching policy includes at least a mappingrelationship between the decreased bandwidth value or the bandwidthdecrease value and the priority value. The first service determiningsubunit 122 is configured to determine the service with priority lowerthan the priority value as the service to be switched from the firsttransmission path to the second transmission path according to aswitching rule in the protection switching policy, and determine thepriority value as indication information about the to-be-switchedservice, where the switching rule includes at least an indication ofdetermining the service with priority lower than the priority value asthe service to be switched from the first transmission path to thesecond transmission path and determining the priority value as theindication information about the to-be-switched service.

Through the foregoing technical solution, the services may bedistinguished by using service priority. When the bandwidth of the firsttransmission path decreases, a part of protected services with prioritylower than the priority value are switched to the second transmissionpath, and therefore, the load is shared reasonably and the reliabilityof service transmission is ensured.

Embodiment 11

FIG. 15 is a schematic structure diagram of an automatic protectionswitching device according to Embodiment 11 of the present invention.This embodiment differs from Embodiment 10 in that the switchingdetermining unit 12 includes: a second priority querying subunit 123 anda second service determining subunit 124. The second priority queryingsubunit 123 is configured to query the protection switching policy toobtain the priority value corresponding to the increased bandwidth valueor the bandwidth increase value according to the bandwidth increase whenmonitoring that the bandwidth of the link on the first transmission pathincreases. The protection switching policy includes at least a mappingrelationship between the increased bandwidth value or the bandwidthincrease value and the priority value. The second service determiningsubunit 124 is configured to determine the service with priority equalto or higher than the priority value as the service to be switched fromthe second transmission path to the first transmission path according toa switching rule in the protection switching policy, and determine thepriority value as indication information about the to-be-switchedservice, where the switching rule includes at least an indication ofdetermining the service with priority equal to or higher than thepriority value as the service to be switched from the secondtransmission path to the first transmission path and determining thepriority value as the indication information about the to-be-switchedservice.

This embodiment specifically shows a partial protection switchingsituation that occurs when the bandwidth increases, and the switchingdetermining unit may simultaneously include a first priority queryingsubunit, a first service determining subunit, a second priority queryingsubunit, and a second service determining subunit. Therefore,bidirectional switching of the protected services occurs between thefirst transmission path and the second transmission path according tothe bandwidth change.

On the basis of the forgoing embodiment, the automatic protection devicefurther includes a first discarding module, which is configured todetermine a part of services on the first transmission path asto-be-discarded services according to the bandwidth change of the firsttransmission path, and discard the to-be-discarded services.

Embodiment 12

FIG. 16 is a schematic structure diagram of another automatic protectionswitching device according to Embodiment 12 of the present invention,including a message receiving module 40 and a service switching module50. The message receiving module 40 is configured to receive a partialswitching message from a peer network edge node through a firsttransmission path or a second transmission path; and the serviceswitching module 50 is configured to determine a part of services on thefirst transmission path or the second transmission path asto-be-switched service(s) according to indication information about theto-be-switched service(s) or bandwidth change information in the partialswitching message, and switch the to-be-switched service(s) betweenlinks on the second transmission path and the first transmission path.

The automatic protection switching device in this embodiment may be astand-alone network element device or integrated in a network edge nodeof a packet network, may perform the automatic protection switchingmethod provided in the embodiments of the present invention, and maydetermine a part of services from the protected services for switchingbetween the second transmission path and the first transmission path,which implements that the load is distributed reasonably and quality andefficiency of transmitting packets are improved.

On the basis of the foregoing technical solution, the service switchingmodule 50 may specifically include: a first information parsing unit 51and a first service switching unit 52. The first information parsingunit 51 is configured to parse the partial switching message to obtain apriority value as indication information about the to-be-switchedservice; and the first service switching unit 52 is configured todetermine a service with priority lower than the priority value in thelink of the first transmission path as a to-be-switched service(s)according to the protection switching policy and the switching rule inthe protection switching policy, and switch the service to the link onthe second transmission path for transmission, and/or determine aservice with priority equal to or higher than the priority value in thelink of the second transmission path as a to-be-switched service(s) andswitch the service to the link on the first transmission path fortransmission. The protection switching policy includes at least theservice priority of the to-be-switched service, and the switching ruleincludes at least an indication of determining a service with prioritylower than the priority value in the link of the first transmission pathas a to-be-switched service(s) and switching the service to the link onthe second transmission path for transmission, and/or determining aservice with priority equal to or higher than the priority value in thelink of the second transmission path as a to-be-switched service(s) andswitching the service to the link on the first transmission path fortransmission.

Through the foregoing technical solution, the services may bedistinguished through service priority, and the protected services withhigh priority are preferably switched to the protection path fortransmission, and therefore, the load is shared properly and thereliability of service transmission is ensured.

Embodiment 13

FIG. 17 is a schematic structure diagram of another automatic protectionswitching device according to Embodiment 13 of the present invention.This embodiment differs from Embodiment 12 in that the service switchingmodule 50 includes: a second information parsing unit 53 and a secondservice switching unit 54. The second information parsing unit 53 isconfigured to use an identifier of a channel for transmitting thepartial switching message as indication information about theto-be-switched service, and determine the services on the channel asto-be-switched service(s) according to the identifier of the channel;and the second service switching unit 54 is configured to switch theto-be-switched service(s) between links on the first transmission pathand the second transmission path.

This embodiment may perform the technical solution of Embodiment 6 ofthe present invention. For the detailed working process, reference maybe made to the description in the forgoing embodiments.

Embodiment 14

FIG. 18 is a schematic structure diagram of another automatic protectionswitching device according to Embodiment 14 of the present invention.This embodiment differs from Embodiment 12 in that the service switchingmodule 50 includes: a third information parsing unit 55 and a thirdservice switching unit 56. The third information parsing unit 55 isconfigured to query the local protection switching policy to determinethe corresponding service as the to-be-switched service(s) according tothe bandwidth change information in the partial switching message, wherethe bandwidth change information includes at least a bandwidth changevalue and/or a changed bandwidth value, and the protection switchingpolicy includes at least a mapping relationship between the bandwidthchange information and the to-be-switched service, and specifically, amapping relationship between the bandwidth change value and/or thechanged bandwidth value and the to-be-switched service. The thirdservice switching unit 56 is configured to switch the to-be-switchedservice(s) between links on the first transmission path and the secondtransmission path.

This embodiment may perform the technical solution of Embodiment 7 ofthe present invention. For the detailed working process, reference maybe made to the description in the forgoing embodiments.

On the basis of the forgoing embodiment, the automatic protection devicemay further include a second discarding module, which is configured todetermine a part of services on the first transmission path asto-be-discarded services according to the bandwidth change informationincluded in the partial switching message, and discard theto-be-discarded services.

Embodiment 15

For the structure of the automatic protection switching system providedin Embodiment 15, reference may be made to FIG. 4-FIG. 7. This systemincludes a first network edge node 401 and a second network edge node405. Intermediate nodes exist between the first network edge node 401and the second network edge node 405 to form a second transmission path420 and a first transmission path 410. The first network edge node 401is configured to: determine a part of services on the first transmissionpath 410 or the second transmission path 420 as to-be-switchedservice(s) according to change of bandwidth when monitoring that thebandwidth of the first transmission path 410 changes; switch theto-be-switched service(s) between a link on the second transmission path420 and a link on the first transmission path 410; and send a partialswitching message to the second network edge node 405 at the peer end ofthe first transmission path 410 or the second transmission path 420,where the partial switching message includes at least indicationinformation about the to-be-switched service(s) or bandwidth changeinformation. The second network edge node 405 is configured to: receivethe partial switching message from the first network edge node 401through the first transmission path 410 or the second transmission path420; and determine a part of services on the first transmission path 410or the second transmission path 420 as to-be-switched service(s)according to the indication information about the to-be-switchedservice(s) or bandwidth change information in the partial switchingmessage, and switch the to-be-switched service(s) between the link onthe first transmission path 410 and the link on the second transmissionpath 420.

The automatic protection switching system provided in this embodimentmay include the two types of automatic protection switching devicesprovided in the embodiments of the present invention, and specificallymay perform the automatic protection switching method provided in theembodiments of the present invention and switch a part of servicesbetween the first transmission path and the second transmission path, sothat the load is distributed reasonably and quality and efficiency oftransmitting packets are improved.

The technical solution of this embodiment is especially applicable tothe situation where the first network edge node is connected to theintermediate node through a microwave link. When monitoring bandwidthchange caused by adaptive modulation of the microwave link due toenvironment change, the first network edge node generates thisprotection switching trigger condition.

When the bandwidth change is caused by adaptive modulation of themicrowave link due to environment change, bandwidth decrease does notmean that the signals are too degraded to transmit services, and a partof bandwidth is still available. Therefore, when the technical solutionof this embodiment is applied in a microwave packet network, thebandwidth resources are fully utilized, and quality and efficiency oftransmitting packets are improved.

Embodiment 16

Embodiment 16 does not indicate that only one embodiment may beincluded, but multiple embodiments may be included.

Embodiment 16 does not indicate that only one embodiment may beincluded, but multiple embodiments may be included.

FIG. 19-1 describes a diagram of a scenario of an automatic protectionswitching method according to Embodiment 16 of the present invention. Ina network applying an APS technology, a protection group generallyincludes at least a first transmission path and a second transmissionpath. Both ends of the first transmission path and the secondtransmission path are converged to two protection switching nodes, whichare generally network edge nodes. These two network edge nodes areconfigured with a transmitting/receiving selection apparatus, so as toimplement protection switching, namely, to determine the path fortransmitting the protected service. The method in this embodimentspecifically may be performed by either network edge node. In thisembodiment, “network edge node” and “peer network edge node” are used todistinguish between two different edge nodes; in a same way, “thenetwork edge node” and “the peer network edge node” refer to theforgoing two edge nodes respectively. In this embodiment, twotransmission paths: VP0 and VP1 are configured between the two edgenodes 1601 and 1605. The two transmission paths are a pair of protectiongroups. Protection switching policies are configured on the node 1601and the node 1605. Therefore, the node 1601 and the node 1605 areprotection switching nodes. Four traffic channels vc1, vc2, vc3, and vc4have different priority levels, and are born on the two transmissionpaths. The CIRs of the four traffic channels are 100 Mbps, 50 Mbps, 150Mbps, and 50 Mbps respectively. VP0 and VP1 pass through one or moreadaptive bandwidth links such as microwave links. In this embodiment,microwave links exist between the node 1602 and the node 1603, andbetween the node 1606 and the node 1607. Because the bandwidth of thesemicrowave links may change with the environment, the bandwidth allocatedby the link to the VP0 and the VP1 may also change. However, generallythe bandwidth change is not random, but is preset. In this embodiment,VP0 has 4 possible bandwidth values: 200 Mbps, 150 Mbps, 100 Mbps, and50 Mbps; and VP1 has 3 possible bandwidth values: 200 Mbps, 150 Mbps,and 100 Mbps. In this way, from the viewpoint of the protectionswitching node (namely, edge node), VP0 and VP1 have 4*3=12 combinationsof bandwidth. In this embodiment, the 12 bandwidth combinations arenumbered into 12 path bandwidth states. As shown in FIG. 19-2, c1-c12are an index of the path bandwidth states. It should be noted that, asame path bandwidth state index table needs to be configured on twoprotection switching nodes, namely, the node 1601 and the node 1605. Insubsequent descriptions, the path allocation policy needs to bedetermined according to the path bandwidth state index, and c1-c12 mayalso be regarded as a channel allocation policy index. Therefore, thepath bandwidth state index and the channel allocation policy indexrepresent a same index, and have different names on differentapplication occasions for ease of understanding. In a normal state,generally the transmission is performed according to the maximumbandwidth, and both VP0 and VP1 have a 200 Mbps capacity. Here, in anMPLS network, the transmission path is a label switching path, and thechannel is a PW or nested inner-layer LSP. In an Ethernet, thetransmission path may be a VLAN connection or PBB-TE connection, and thechannel may be expressed as an inner-layer VLAN; in an OTN network, thetransmission path may be a higher-order ODU cross-connect path, and thechannel may be a lower-order ODU; in an SDH network, the transmissionpath may be a VC4 cross connection, and the channel may be a lower-orderVC, such as VC12.

FIG. 20 describes configuration of a channel allocation policy andchannel allocation in a normal state. The channel allocation policytable is configured on two protection switching nodes 1601 and 1605, anddescribes a mapping relationship between the channel and the path underdifferent path bandwidth states. In the channel allocation policy table,0 and 1 are sequence numbers of the transmission paths, and correspondto VP0 and VP1 respectively; and D indicates that the correspondingservice should be discarded. The cause for the discarding is generallythat the bandwidth is not enough for bearing the service. The followinguses two examples to explain the channel allocation policy table. Thepath bandwidth state c1 is taken as an example. In this path bandwidthstate, the channel vc1 and the channel vc2 are allocated to be born onVP0, and the channel vc3 and the channel vc4 are allocated to be born onVP1. The path state c11 is taken as an example. vc1 and vc4 should beborn on VP1; vc2 should be born on VP0; and vc3 will be discarded. Herec1-c12 correspond to different channel allocation policies respectively.Therefore, c1-c12 may also be called a channel allocation policy index.Because the channel generally corresponds to the service, the channelallocation policy index table here may also be called a serviceallocation index table, and accordingly, c1-c12 may also be calledservice allocation policy indexes. In FIG. 20, the protection switchingnode monitors that the bandwidth of VP0 and the bandwidth of VP1 are 200Mbps, and therefore, the channels are allocated according to the policycorresponding to the bandwidth state c1.

FIG. 21-FIG. 23 show a protection switching situation where thebandwidth decreases relative to FIG. 20. The protection switchingincludes the following steps:

Step 1901: When monitoring that the bandwidth of at least onetransmission path in a protection group changes, the protectionswitching node determines a changed path bandwidth combination. Thechanged path bandwidth combination includes bandwidth of everytransmission path in the protection group after the bandwidth changes;and the protection switching node stores a mapping relationship betweenthe path bandwidth combination and the channel allocation policy on thepath.

In this embodiment, a path may have multiple bandwidth combinations, andeach bandwidth combination of the path may correspond to a channelallocation policy index. The protection switching node may store a pathbandwidth state index table, where the path bandwidth state indexincludes a mapping relationship between the path bandwidth combinationand the channel allocation policy index. The protection switching nodein this embodiment further stores a mapping relationship between thepath bandwidth combination and the channel allocation policy on thepath. Because the path bandwidth combination corresponds to the channelallocation policy index, the protection switching node may store notonly a bandwidth state index table, but also a channel allocation policyindex table. The channel allocation policy index table includes amapping relationship between the channel allocation index and thechannel allocation on the path. After determining a bandwidthcombination, the protection switching node may search the path bandwidthstate index table for the corresponding channel allocation policy index,and then search the channel allocation policy index table for thechannel allocation policy on the path corresponding to the channelallocation policy index.

In this step, the determining when monitoring that the bandwidth of atleast one transmission path in a protection group changes, thedetermining the changed path bandwidth combination includes thefollowing:

The protection switching node monitors the bandwidth of eachtransmission path, and determines the monitored changed bandwidth ofeach transmission path as the bandwidth of this transmission path whenmonitoring that the bandwidth of at least one transmission path changes;or:

The protection switching node monitors the bandwidth of eachtransmission path, and receives each transmission path's bandwidthmonitored by the peer protection switching node at the same time,compares the each transmission path' bandwidth monitored by the networkedge node with the each transmission path' bandwidth received by thepeer network edge node, selects the smaller value as the bandwidth ofthe determined corresponding transmission path, and determines thechanged path bandwidth combination accordingly.

Step 1902: The protection switching node queries the stored mappingrelationship between the path bandwidth combination and the channelallocation policy on the path according to the changed path bandwidthcombination, and determines the channel allocation policy under thechanged path bandwidth state.

Step 1903: By switching the channel between paths in the protectiongroup or discarding traffic of the channel directly, the protectionswitching node adjusts the current channel allocation policy to thechannel allocation policy under the changed path bandwidth state.

Specifically, FIG. 21 describes an implementation mode of protectionswitching that occurs when the bandwidth decreases relative to FIG. 20:

Before the bandwidth changes, the current bandwidth of VP0 and thecurrent bandwidth of VP1 are 200 Mbps; the channel allocation policyindex is c1; in this path bandwidth state, the channel vc1 and thechannel vc2 are allocated to be born on VP0, and the channel vc3 and thechannel vc4 are allocated to be born on VP1. The network edge node 1601obtains the changed bandwidth information. The bandwidth of VP0decreases to 100 Mbps, and the bandwidth of VP1 decreases to 150 Mbps.The current path bandwidth state is: the bandwidth of VP0 is 100 Mbpsand the bandwidth of VP1 is 150 Mbps. Through search in the pathbandwidth state table according to the current path bandwidth state, thepath bandwidth state index c8 is obtained; c8 is used as a channelallocation policy index to search the channel allocation policy tableand to obtain the changed channel allocation policy: using VP1 to bearvc1 and vc4, using VP0 to bear vc2, and discarding vc3. The changedchannel allocation policy is different from the current channelallocation policy, and therefore, the protection switching action istriggered: switching vc1 from VP0 to VP1, and discarding all traffic ofvc3.

FIG. 21 describes a unidirectional switching mechanism, withoutinvolving automatic protection switching coordination between twoprotection switching nodes. In practice, an adaptive bandwidth link suchas a microwave link has different frequencies in two directions of thelink, and the impact caused by the external environment on the twodirections also differs. In this way, the bandwidth in the twodirections may be inconsistent, and in this case, two protectionswitching nodes may obtain different path bandwidth states, which maycause that the channel allocation policy differs between the twoprotection switching nodes. For the unidirectional switching policy, theforegoing processing is appropriate; however, for the bidirectionalswitching policy, it is required that the channel allocation policy onboth sides should be exactly the same, and two protection switchingnodes need to coordinate with each other. Specifically, FIG. 22 and FIG.23 describe another implementation mode of protection switching thatoccurs when the bandwidth decreases relative to FIG. 20:

The protection switching node 1601 obtains the current west-to-eastsending bandwidth: The bandwidth of VP0 is 100 Mbps, and the bandwidthof VP1 is 100 Mbps. According to the bandwidth state, the node 1601searches out the path bandwidth state index as c9, and thus performsservice switching according to the channel allocation policycorresponding to c9. The switching details are ignored here. Moreover,an APS message is sent to the protection switching node 1605. Therequest signals in the APS message carry the bandwidth state index valuec9.

The protection switching node 1605 obtains the current east-to-westtransmitting bandwidth. The bandwidth of VP0 is 50 Mbps, and thebandwidth of VP1 is 150 Mbps. According to the bandwidth state, the node1605 searches out the path bandwidth state index as c11, and thusperforms service switching according to the channel allocation policycorresponding to c11, switches vc1 from VP0 to VP1, and discards alltraffic of vc3. Moreover, an APS message is sent to the protectionswitching node 1601. The request signals in the APS message carry thebandwidth state index value c11.

After receiving the APS message sent by the protection switching node1601, the protection switching node 1605 searches a bandwidth statetable based on the bandwidth state index value c9 carried in the APSmessage, and obtains the west-to-east path bandwidth state as follows:The bandwidth of VP0 is 100 Mbps, and the bandwidth of VP1 is 100 Mbps.The locally obtained east-to-west transmitting bandwidth is: thebandwidth of VP0 is 50 Mbps, and the bandwidth of VP1 is 150 Mbps. Theminimum value of bandwidth of each path is selected to obtain newbidirectional bandwidth states as follows: The bandwidth of VP0 is 50Mbps, and the bandwidth of VP1 is 100 Mbps. The bandwidth state table issearched to obtain the new path bandwidth state index c12; and thechannel allocation table is searched to obtain the channel allocationpolicy corresponding to c12: using VP0 to bear vc2, using VP1 to bearvc4, and discarding vc1 and vc3. The protection switching node adjuststhe channels according to this policy: discards the traffic of vc1 andvc3. Moreover, in the APS message sent to the protection switching node,the bridge signal value is updated to c12.

The protection switching node 1601 performs operations similar to theoperations of the protection switching node 1605, and the detailed arenot repeated here again.

FIG. 21 describes a protection switching situation that occurs when thebandwidth decreases relative to FIG. 20. The protection switching mayfurther include the following step:

Step 2401: Monitor the bandwidth of the first transmission path and/orthe second transmission path. When it is determined that the finallymonitored bandwidth of the first transmission path and/or the finallymonitored bandwidth of the second transmission path changes relative tothe initial bandwidth of the first transmission path and/or the initialbandwidth of the second transmission path, the network edge nodedetermines the finally monitored bandwidth of the first transmissionpath and/or the finally monitored bandwidth of the second transmissionpath as a final path bandwidth combination. The network edge node storesa mapping relationship between the path bandwidth combination and thechannel allocation policy on the path.

In this embodiment, the determining that the finally monitored bandwidthof the first transmission path and/or the finally monitored bandwidth ofthe second transmission path changes relative to the initial bandwidthof the first transmission path and/or the initial bandwidth of thesecond transmission path may specifically be: comparing the finallymonitored bandwidth of the first transmission path with the initialbandwidth of the first transmission path; comparing the finallymonitored bandwidth of the second transmission path with the initialbandwidth of the second transmission path; and if either of the twocomparison results shows that the two compared bandwidth values aredifferent, namely, if the finally monitored bandwidth of the firsttransmission path is different from the initial bandwidth of the firsttransmission path, or the finally monitored bandwidth of the secondtransmission path is different from the initial bandwidth of the secondtransmission path, or the finally monitored bandwidth of the firsttransmission path and the finally monitored bandwidth of the secondtransmission path are different from the initial bandwidth of the firsttransmission path and the initial bandwidth of second transmission path,determining that the finally monitored bandwidth of the firsttransmission path and/or the finally monitored bandwidth of the secondtransmission path changes relative to the initial bandwidth of the firsttransmission path and/or the initial bandwidth of the secondtransmission path.

In this embodiment, a path may have multiple bandwidth combinations, andeach bandwidth combination of the path may correspond to a channelallocation policy index. The network edge node may store a pathbandwidth state index table, where the path bandwidth state index tableincludes a mapping relationship between the path bandwidth combinationand the channel allocation policy index. The network edge node in thisembodiment further stores a mapping relationship between the pathbandwidth combination and the channel allocation policy on the path.Because the path bandwidth combination corresponds to the channelallocation policy index, the network edge node may store not only abandwidth state index table, but also a channel allocation policy indextable. The channel allocation policy index table includes a mappingrelationship between the channel allocation index and the channelallocation on the path. After determining a bandwidth combination, thenetwork node may search the path bandwidth state index table for thecorresponding channel allocation policy index, and then search thechannel allocation policy index table for the channel allocation policyon the path corresponding to the channel allocation policy index.

In this step, the network edge node monitors the bandwidth of the firsttransmission path and/or the second transmission path, and, when it isdetermined that the finally monitored bandwidth of the firsttransmission path and/or the finally monitored bandwidth of the secondtransmission path changes relative to the initial bandwidth of the firsttransmission path and/or the initial bandwidth of the secondtransmission path, the network edge node determines the finallymonitored bandwidth of the first transmission path and/or the finallymonitored bandwidth of the second transmission path as a final pathbandwidth combination. This step includes the following:

24011: The network edge node monitors the bandwidth of the firsttransmission path and the second transmission path, determines themonitored bandwidth of the first transmission path as the finallymonitored bandwidth of the first transmission path, and determines themonitored bandwidth of the second transmission path as the finallymonitored bandwidth of the second transmission path; compares theinitial bandwidth of the first transmission path with the finallymonitored bandwidth of the first transmission path, and compares theinitial bandwidth of the second transmission path with the finallymonitored bandwidth of the second transmission path; and the networkedge node determines the finally monitored bandwidth of the firsttransmission path and/or the finally monitored bandwidth of the secondtransmission path as a final path bandwidth combination when it isdetermined that the finally monitored bandwidth of the firsttransmission path and/or the finally monitored bandwidth of the secondtransmission path changes relative to the initial bandwidth of the firsttransmission path and/or the initial bandwidth of the secondtransmission path;

or,

24012 The network edge node monitors the bandwidth of the firsttransmission path and the second transmission path, and receives thefirst transmission path's bandwidth and the second transmission path'sbandwidth monitored by the peer network edge node at the same time;compares the first transmission path's bandwidth monitored by thenetwork edge node with the first transmission path's bandwidth receivedfrom the peer network edge node, and selects the smaller bandwidth valueas the finally monitored bandwidth of the first transmission path;compares the second transmission path's bandwidth monitored by thenetwork edge node with the second transmission path's bandwidth receivedfrom the peer network edge node, and selects the smaller bandwidth valueas the finally monitored bandwidth of the second transmission path;compares the initial bandwidth of the first transmission path with thefinally monitored bandwidth of the first transmission path, and comparesthe initial bandwidth of the second transmission path with the finallymonitored bandwidth of the second transmission path; and the networkedge node determines the finally monitored bandwidth of the firsttransmission path and/or the finally monitored bandwidth of the secondtransmission path as a final path bandwidth combination when it isdetermined that the finally monitored bandwidth of the firsttransmission path and/or the finally monitored bandwidth of the secondtransmission path changes relative to the initial bandwidth of the firsttransmission path and/or the initial bandwidth of the secondtransmission path;

or,

24013: The network edge node monitors the bandwidth of the firsttransmission path and the second transmission path, determines themonitored bandwidth of the first transmission path as the intermediatemonitored bandwidth of the first transmission path, and determines themonitored bandwidth of the second transmission path as the intermediatemonitored bandwidth of the second transmission path; compares theinitial bandwidth of the first transmission path with the intermediatemonitored bandwidth of the first transmission path, and compares theinitial bandwidth of the second transmission path with the intermediatemonitored bandwidth of the second transmission path; and the networkedge node determines the intermediate monitored bandwidth of the firsttransmission path and/or the intermediate monitored bandwidth of thesecond transmission path as a final path bandwidth combination when itis determined that the intermediate monitored bandwidth of the firsttransmission path and/or the intermediate monitored bandwidth of thesecond transmission path changes relative to the initial bandwidth ofthe first transmission path and/or the initial bandwidth of the secondtransmission path; the network edge node queries the stored mappingrelationship between the path bandwidth combination and the channelallocation policy on the path according to the intermediate pathbandwidth combination, and determines the channel allocation policy onthe path corresponding to the intermediate path bandwidth combination;judges whether the channel allocation policy corresponding to theintermediate path bandwidth combination is the same as the initialchannel allocation policy, and, if the channel allocation policycorresponding to the intermediate path bandwidth combination isdifferent from the initial channel allocation policy, performs channelswitching according to the channel allocation policy corresponding tothe intermediate path bandwidth combination; the network edge nodereceives the first transmission path's bandwidth and the secondtransmission path's bandwidth monitored by the peer network edge node,compares the first transmission path's bandwidth monitored by thenetwork edge node with the first transmission path's bandwidth receivedfrom the peer network edge node, and selects the smaller bandwidth valueas the finally monitored bandwidth of the first transmission path;compares the second transmission path's bandwidth monitored by thenetwork edge node with the second transmission path's bandwidth receivedfrom the peer network edge node, and selects the smaller bandwidth valueas the finally monitored bandwidth of the second transmission path;compares the intermediate monitored bandwidth of the first transmissionpath with the finally monitored bandwidth of the first transmissionpath, and compares the intermediate monitored bandwidth of the secondtransmission path with the finally monitored bandwidth of the secondtransmission path; and the network edge node determines the finallymonitored bandwidth of the first transmission path and/or the finallymonitored bandwidth of the second transmission path as a final pathbandwidth combination when it is determined that the finally monitoredbandwidth of the first transmission path and/or the finally monitoredbandwidth of the second transmission path changes relative to theintermediate monitored bandwidth of the first transmission path and/orthe intermediate monitored bandwidth of the second transmission path.

Step 2402: The network edge node queries the stored mapping relationshipbetween the path bandwidth combination and the channel allocation policyon the path according to the final path bandwidth combination, anddetermines the channel allocation policy on the path corresponding tothe final path bandwidth combination.

Step 2403: If the channel allocation policy corresponding to the finalpath bandwidth combination is different from the initial channelallocation policy, channel switching is performed according to thechannel allocation policy corresponding to the final path bandwidthcombination.

In this embodiment, the initial channel allocation policy may be thestored mapping relationship between the path bandwidth combination andthe channel allocation policy on the path, and the channel allocationpolicy corresponding to the initial path bandwidth combination. Theinitial path bandwidth combination may be a combination of the initialbandwidth of the first transmission path and the initial bandwidth ofthe second transmission path.

Specifically, as regards the method of step 19031 for determining thefinal path bandwidth combination, before the bandwidth changes, theinitial bandwidth of VP0 and the initial bandwidth of VP1 are 200 Mbps;the channel allocation policy index is c1; in this path bandwidth state,the channel vc1 and the channel vc2 are allocated to be born on VP0, andthe channel vc3 and the channel vc4 are allocated to be born on VP1.FIG. 21 is taken as an example. The network edge node obtains the finalbandwidth information. The bandwidth of VP0 decreases to 100 Mbps, andthe bandwidth of VP1 decreases to 150 Mbps. The initial path bandwidthstate is as follows: The bandwidth of VP0 is 100 Mbps and the bandwidthof VP1 is 150 Mbps. Through search in the path bandwidth state tableaccording to the initial path bandwidth state, the path bandwidth stateindex c8 is obtained; c8 is used as an index to search the channelallocation policy index table and obtain the final channel allocationpolicy: using VP1 to bear vc1 and vc4, using VP0 to bear vc2, anddiscarding vc3. The final channel allocation policy is different fromthe initial channel allocation policy, and therefore, a protectionswitching action is enabled: switching vc1 from VP0 to VP1, anddiscarding all traffic of vc3.

The network edge node above is also called a protection switching node.

In the embodiments and the claims of this application, the concept ofthe protection switching node is equivalent to the concept of thenetwork edge node, and both concepts may be exchanged with each other.

It should be noted that, for ease of description, this embodimentdescribes only the situation where merely two transmission paths areincluded in a protection group. However, a situation where more than twotransmission paths are included in a protection group may exist, and, inthis case, this protection switching method is still applicable so longas the relationship between the service and the channel under variousbandwidth combinations is configured in the channel allocation policytable.

Persons of ordinary skill in the art may understand that, all or a partof the steps of the method according to the embodiments of the presentinvention may be implemented by a program instructing relevant hardware.The program may be stored in computer readable storage media. When theprogram runs, the steps of the method in the embodiments of the presentinvention are performed. The storage media may be any media capable ofstoring program codes, such as ROM, RAM, a magnetic disk, or an opticaldisk.

Finally, it should be noted that, the forgoing embodiments are merelyprovided for describing the technical solutions of the presentinvention, but are not intended to limit the present invention. Personsof ordinary skill in the art may understand that, although the presentinvention has been described in detail with reference to the forgoingembodiments, modifications or equivalent replacements may still be madeto the technical solutions of the present invention, and thesemodifications or equivalent replacements do not cause the modifiedtechnical solutions to depart from the spirit and scope of the technicalsolutions of the present invention.

What is claimed is:
 1. An automatic protection switching method,comprising: querying, by a network edge node when monitoring that abandwidth of a first transmission path decreases, a protection switchingpolicy to obtain a priority value corresponding to a decreased bandwidthvalue or a bandwidth decrease value according to the decrease of thebandwidth, wherein the protection switching policy comprises at least amapping relationship between the decreased bandwidth value or bandwidthdecrease value and the priority value, and comprises a switching rule,and the switching rule comprises indication information of determiningservice(s) with priority lower than the priority value as service(s) tobe switched from the first transmission path to the second transmissionpath; determining, by the network edge node, the service(s) withpriority lower than the priority value as the service(s) to be switchedfrom the first transmission path to the second transmission path; andswitching, by the network edge node, the to-be-switched service(s)between the second transmission path and the first transmission path. 2.The automatic protection switching method according to claim 1, wherein:after the network edge node switches the to-be-switched service(s)between the second transmission path and the first transmission path,the method further comprises: sending, by the network edge node, apartial switching message to a peer network edge node of the networkedge node on the first transmission path or the second transmissionpath, wherein the partial switching message includes at least indicationinformation about the to-be-switched service(s) or information about thebandwidth change, and is used to instruct the peer network edge node todetermine the to-be-switched service(s) according to the partialswitching message and switch the to-be-switched service(s) between thesecond transmission path and the first transmission path.
 3. Theautomatic protection switching method according to claim 2, wherein:sending, by the network edge node, the partial switching message to thepeer network edge node of the network edge node on the firsttransmission path or the second transmission path comprises: sending, bythe network edge node through a channel for transmitting theto-be-switched service(s), the partial switching message to the peernetwork edge node of the network edge node on the first transmissionpath or the second transmission path, wherein indication information inthe partial switching message is an identifier of a channel fortransmitting the partial switching message.
 4. The automatic protectionswitching method according to claim 1, the method further comprises:determining, by the network edge node, a part of protected services onthe first transmission path as to-be-discarded services according tobandwidth change of the first transmission path, and discarding theto-be-discarded services.
 5. An automatic protection switching method,comprising: querying, by a network edge node when monitoring that abandwidth of a first transmission path increases, a protection switchingpolicy to obtain a priority value corresponding to an increasedbandwidth value or a bandwidth increase value according to the increaseof the bandwidth, wherein the protection switching policy comprises amapping relationship between the increased bandwidth value or bandwidthincrease value and the priority value, and comprises a switching rule,and the switching rule comprises indication information of determiningservice(s) with priority equal to or higher than the priority value asservice(s) to be switched from the second transmission path to the firsttransmission path; determining, by the network edge node, the service(s)with priority equal to or higher than the priority value as theservice(s) to be switched from the second transmission path to the firsttransmission path; and switching, by the network edge node, theto-be-switched service(s) between the second transmission path and thefirst transmission path.
 6. The automatic protection switching methodaccording to claim 5, further comprising: sending, by the network edgenode, a partial switching message to a peer network edge node of thenetwork edge node on the first transmission path or the secondtransmission path, wherein the partial switching message includes atleast indication information about the to-be-switched service(s) orinformation about the bandwidth change, and is used to instruct the peernetwork edge node to determine the to-be-switched service(s) accordingto the partial switching message and switch the to-be-switchedservice(s) between the second transmission path and the firsttransmission path.
 7. The automatic protection switching methodaccording to claim 6 wherein: sending, by the network edge node, thepartial switching message to the peer network edge node of the networkedge node on the first transmission path or the second transmission pathcomprises: sending, by the network edge node through a channel fortransmitting the to-be-switched service(s), the partial switchingmessage to the peer network edge node of the network edge node on thefirst transmission path or the second transmission path, whereinindication information in the partial switching message is an identifierof a channel for transmitting the partial switching message.
 8. Theautomatic protection switching method according to claim 5, furthercomprising: determining, by the network edge node, a part of protectedservices on the first transmission path as to-be-discarded servicesaccording to bandwidth change of the first transmission path, anddiscarding the to-be-discarded services.